package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：lblbh on 2017/12/6 16:46
 * 邮箱：lanbuhan@163.com
 * 功能：地图itme
 */
public class MapItem implements Parcelable {

    /**
     “objectId”:11   //对象ID
     “objectType”:0   //对象类型：1-场馆，2-活动，3-景点
     “longitude”:”116.23345”  //经度
     “latitude”:”40.234234”   //纬度
     “distance”:”12.21km”   //距离
     “title”:”内蒙古博物馆”    //名称
     “phone”:"13522141554"  //电话
     “address”:”内蒙古呼和浩特市....”  //地址
     “fixImgUrl”:”http://domain:port/data/2017/04/13/223.jpg” //缩略图
     “more”:”http://domain:port/map/detail/223.shtml” //详情页
     “offHour”:”夏季：07:30-22:00，冬季08:00-21:00” //开放时间

     “startTime”:”2017-11-23”  //活动预约时间 活动地图有
     “status”:1               //活动状态值  活动地图有
     “statusName”:”预约中”    //活动状态名称  活动地图有
     “color”:”#000000”  //活动状态颜色  活动地图有

     “actCount”5 //活动数量  场馆专有
     */

    public int status;
    public int actCount;
    public int objectId;
    public int objectType;
    public String city;
    public String more;
    public String title;
    public String phone;
    public String color;
    public String address;
    public String offHour;
    public String distance;
    public String latitude;
    public String longitude;
    public String fixImgUrl;
    public String startTime;
    public String statusName;

    public MapItem() {}

    public MapItem(String latitude,String longitude) {
        this.latitude = latitude;
        this.longitude = longitude;
    }


    @SuppressWarnings("unchecked")
    public MapItem(Parcel in) {
        objectId = in.readInt();
        city = in.readString();
        latitude = in.readString();
        longitude = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(objectId);
        dest.writeString(city);
        dest.writeString(latitude);
        dest.writeString(longitude);
    }


    public static final Creator<MapItem> CREATOR = new Creator<MapItem>() {
        @Override
        public MapItem[] newArray(int size) {
            return new MapItem[size];
        }

        @Override
        public MapItem createFromParcel(Parcel in) {
            return new MapItem(in);
        }
    };


}
